<h2><?= $this->translate("ProductsList") ?></h2>
<?php if (count($this->products)>0) { ?>
    <table>
    	<tr>
    		<th>
    			<?= $this->translate("Id") ?>
    		</th>
    		<th>
    			<?= $this->translate("Name") ?>
    		</th>		
    	</tr>
    	<?php foreach($this->products as $product) { ?>
        	<tr>
        		<td>
        			<?= $product->id ?>
        		</td>	
        		<td>
        			<?= $product->translate("name") ?>
        		</td>
        		<td>
        			<a href="<?= $this->url(array("controller"=>"products","action"=>"edit-product","id"=>$product->id)) ?>" title="<?= $this->translate("Edit") ?>"><?= $this->translate("Edit") ?></a>			
        		</td>
        		<td>
        			<a href="<?= $this->url(array("controller"=>"products","action"=>"remove-product","id"=>$product->id)) ?>" title="<?= $this->translate("Delete") ?>"><?= $this->translate("Delete") ?></a>			
        		</td>	
        	</tr>
    	<?php } ?>
    	<tr>
    		<td colspan="2">
    			<a href="<?= $this->url(array("controller"=>"products","action"=>"add-product")) ?>" title="<?= $this->translate("New") ?>"><?= $this->translate("New") ?></a>
    		</td>
    	</tr>
    </table>
    <?= $this->paginationControl($this->products, 'Sliding', 'paginatorControl.phtml') ?>
<?php } else { ?>	
    <div><?= $this->translate("No products found") ?></div>
	<a href="<?= $this->url(array("controller"=>"products","action"=>"add-product")) ?>" title="<?= $this->translate("New") ?>"><?= $this->translate("New") ?></a>	
<?php } ?>